<include file='Index/header'/>
  <script language="javascript" type="text/javascript" src="__PUBLIC__/My97DatePicker/WdatePicker.js"></script>  
  

<include file='Index/left'/>

    <div class="content">
        
        <div class="header">
            
            <h1 class="page-title">课程安排</h1>
        </div>
        
                <ul class="breadcrumb">
            <li><a href="{:U('Index/Index')}">首页</a> <span class="divider">/</span></li>
            <li class="active">班次管理</li>
        </ul>

        <div class="container-fluid">
            <div class="row-fluid">  
                    
<div class="btn-toolbar">
    <button class="btn btn-primary" onclick="window.location='__CONTROLLER__/Addclasses'" ><i class="icon-plus"></i>添加班次</button>
   
    <button class="btn" onclick="window.location='__CONTROLLER__/Daochu/fs/classes'">导出Excel</button>
  <div class="btn-group">
  </div>
</div> 
                <div class="well well-sm">
                    <form id="cx" name="cx" method="get" action="__CONTROLLER__/Classes">
                        <lable>班次编号：</lable>
                        <input type="text" name="scheid" placeholder=""  value="{$Think.session.scheid}" style="width:80px"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <lable>班次名称：</lable>
                        <input type="text" name="schename" placeholder=""  value="{$Think.session.schename}" style="width:80px"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                         <lable>班次类别：</lable>
                        <select name="classlb" id="classlb">
                            <option value=""></option>
                            <volist name="dqlist" id="vb">
                                <option value="{$vb.dict_name}">{$vb.dict_name}</option>
                            </volist>
                        </select>

                        <!--<input type="text" name="classlb" placeholder=""  value="{$Think.session.classlb}" style="width:80px"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-->
                        <lable>主办单位：</lable>
                        <input type="text" name="zbdw" placeholder="" value="{$Think.session.zbdw}" style="width:100px">
                        
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <button  type="button" class="btn btn-primary" onclick="submit()">&nbsp;&nbsp;查&nbsp;&nbsp;询&nbsp;&nbsp;</button>
                    </form>      
                    
                     
                </div>              
<div class="well" id='well2'>
    <table class="table table-striped">
      <thead>
        <tr>
            <th nowrap="">#</th>
          <th nowrap="">班次编号</th>
          <th nowrap="">班次名称</th>
   
          <th nowrap="">班次类别</th>
          <th nowrap="">接班老师</th>
          <th nowrap="">带班老师</th>
		  <th nowrap="">主办单位</th>
          <th width='180'>备注</th>
          
          <th style="width: 26px;"></th>
        </tr>
      </thead>
      <tbody>
          <volist name="tinfo" id="vo">
        <tr>
          <td nowrap="">{$vo.id}</td>
        <td nowrap="">{$vo.scheid}</td>
        <td nowrap=""><a href="javascript:void(0)" onclick="showlist('{$vo.schename}')"><span id="cour">{$vo.schename}</span></a></td>
         
          <td nowrap="">{$vo.classlb}</td>
          <td nowrap="">{$vo.jteacher}</td>
          <td nowrap="">{$vo.dteacher}</td>
       <td nowrap="">{$vo.zbdw}</td>
          <td width='180'><div id='hd{$vo.id}' class="hd" >{$vo.remark}<span id="hd3{$vo.id}" style="display:none"><a href='javascript:void(0)' onclick='hiden({$vo.id})'>收起</a></span></div><div id='hd2{$vo.id}'> <a href='javascript:void(0)' onclick='show({$vo.id})'>+</a><div></td>
          <td nowrap="">
              <a href="__CONTROLLER__/Classesxg/id/{$vo.id}"><i class="icon-pencil"></i></a>
             <a onclick="return confirm('正在删除班次{$vo.scheid}，请确认')"href="__CONTROLLER__/del/lb/classes/id/{$vo.id}"><i class="icon-remove"></i></a>

          </td>
        </tr>

          </volist>

      </tbody>
    </table>
</div>
            

    {$page}

   <div class="modal fade" id="myModal" tabindex="-1" role="dialog" 
   aria-labelledby="myModalLabel" aria-hidden="true">
   <div class="modal-dialog">
      <div class="modal-content">
         <div class="modal-header">
            <button type="button" class="close" 
               data-dismiss="modal" aria-hidden="true">
                  &times;
            </button>
            <h4 class="modal-title" id="myModalLabel">
              课程列表
            </h4>
         </div>
          <div>
              <div id='listsp'></div>
      </div>
      </div><!-- /.modal-content -->
</div><!-- /.modal -->
</div>          
                <script>             
function showlist(bcbh){
    //  var bcbh=$("#cour").text();
     $.ajax({
                type: "POST",
                url: "__CONTROLLER__/showlista",
           
                cache: false,
                data: {
                 kcname:bcbh
                    
                },
         
                    success: function(data) {
               
      $('#listsp').html(data);                     
  $('#myModal').modal('show');
  $('#myModal').modal().css({
    width: 'auto',
    height:'500px',
    'margin-left': function () {
       return -($(this).width() / 2);
   }
});
                       }
                    
        
        
        
        });

   
              }
function show(id) {
    $('#hd' + id).css({'overflow': 'visible'});
    $('#hd2' + id).hide();
    $('#hd3' + id).css({'display': 'block'});

}

function hiden(id) {
    $('#hd' + id).css('overflow','hidden');
    $('#hd3' + id).css({'display': 'none'});
    $('#hd2' + id).show();
}
//function show(id){
//  $('#hd'+id).css({'overflow':'visible'})  ;
//  $('#hd2'+id).hide();
//   $('#hd3'+id).css({'display':'block'})  ;
//
//}
//function hiden(id){
//
//  $('#hd'+id).css({'overflow':'hidden'})  ;
//  $('#hd2'+id).show();
//}
</script>
                    
<include file='Index/footer'/>
